<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
    <!--<link rel="stylesheet" th:href="@{/css/frm_base.css}" />-->
    <script th:src="@{/js/jquery-3.5.1.js}"></script>


</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">高校迎新系统</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a th:target="ifm" th:href="@{/notice}">
                    消息
                    <span class="layui-badge" id="noticeCount" style="display: none"></span>
                </a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img th:src="@{/img/tx_boy.png}" class="layui-nav-img">
                    <block th:text="${session.sysUser.username}"></block>
                </a>
                <dl class="layui-nav-child">
                    <dd><a target="ifm" th:href="@{/sys/userInfo}">账号信息</a></dd>
                    <dd><a th:href="@{/sys/logout}">退出登录</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul id="menu" class="layui-nav layui-nav-tree" lay-filter="menu">
                <li class="layui-nav-item"><a target="ifm" th:href="@{/sys/welcome}">首页</a></li>
                <!--管理员菜单-->
                <block th:if="${session.sysUser.roleType==1}">
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/sysUser}">辅导员管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/academy}">院系管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/subject}">专业管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/course}">课程管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/clazz}">班级管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/exam}">考试管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/es}">成绩管理</a></li>
                </block>
                <block th:if="${session.sysUser.roleType==2}">
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/sysUser/student}">学生管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/exam}">考试管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/es}">成绩管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/sysUser/graduation}">毕业生管理</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/xjApply}">学籍异动申请</a></li>
                </block>
                <block th:if="${session.sysUser.roleType==3}">
                    <li class="layui-nav-item">
                        <a target="ifm" th:href="@{'/sysUser/info?action=update&stuId='+${session.sysUser.id}}">学籍信息</a>
                    </li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/sysUser/myScore}">个人成绩</a></li>
                    <li class="layui-nav-item"><a target="ifm" th:href="@{/xjApply/myXjApply}">我的申请</a></li>
                </block>
            </ul>
        </div>
    </div>

    <div class="layui-body" style="background-color: rgb(245,247,249)">
        <!-- 内容主体区域 -->
        <div id="content" style="height: 100%">
            <iframe class="sub_page" name="ifm" runat="server" th:src="@{/sys/welcome}" width="100%" height="100%"
                    frameborder="no" border="0" marginwidth="0"
                    marginheight="0" scrolling="yes" allowtransparency="yes"></iframe>
        </div>
    </div>

    <div id="footer" class="layui-footer">© fqyd.com</div>
</div>

<script th:src="@{/layui/layui.js}"></script>
<script>
    layui.use('element', function(){
        var element = layui.element;

        $.get('/ssms/notice/getCount',function (res) {
            if(res.code == 200){
                var count = res.data;
                if(count && count > 0){
                    $('#noticeCount').css('display','').text(count)
                }
            }
        })

    });

</script>
</body>
</html>